<!DOCTYPE html>
<html>

<head>
    <title>
        <%= title %>
    </title>
    <link rel='stylesheet' href='/stylesheets/style.css' />
    <link rel="stylesheet" href="http://alovez.cc/css/tomorrow-night.css" />
    <script src="http://alovez.cc/js/highlight.pack.js"></script>
    <script>hljs.initHighlightingOnLoad();</script>
</head>

<body>
    <header>
        <h1><%= title %></h1>
    </header>
    <nav>
        <span><a title="主页" href="/">主页</a></span>
        <% if(user){ %>
        <span><a title="上传" href="/upload">上传文件</a></span>
        <span><a title="发表" href="/post">发布文章</a></span>
        <span><a title="登出" href="/logout">登出</a></span>
        <% } else { %>
        <span><a title="登陆" href="/login">登陆</a></span>
        <span><a title="注册" href="/reg">注册</a></span>
        <% } %>
    </nav>
    <article>
    <% if (error) { %>
    <div><%= error %></div>
    <% } %>
    <% if (success) { %>
    <div><%= success %></div>
    <% } %>
    
    
    
    